<?php
/**
 * Organization Template for Room Booking component
 */
defined('_JEXEC') or die('Restricted access');
$js="function submitbutton(pressbutton) {

      var form = document.adminForm;

      if (pressbutton == 'cancel') {
      	submitform( pressbutton );
      	return;
      }
      // do field validation
       if (form.name.value == ''){
           alert('".JText::_( 'SPECORGNAME', true )."');
      } else
	   submitform( pressbutton );
       }";

$document =& JFactory::getDocument();
$document->addScriptDeclaration($js);
?>

<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col100">
	<fieldset class="adminform">
		<?php echo JText::_( 'FIELDSREQUIRED' ); ?>
		<legend><?php echo JText::_( 'ORGANIZATION' ); ?></legend>
		<table class="admintable">
		<?php if ($this->item->id>0)
		echo '<tr>
			<td width="100" align="right" class="key">
				<label  for="id">
					'.JText::_( 'ID' ).':
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="id" id="id" size="10" disabled="disabled" value="'.$this->item->id.'" />
			</td>
		</tr>';?>
		<tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'NAME' ); ?>*:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="name" id="name" style="width:300px" maxlength="250" value="<?php echo $this->item->name;?>" />
			</td>
		</tr>
	</table>
	</fieldset>
</div>
<div class="clr"></div>

<input type="hidden" name="option" value="com_roombooking" />
<input type="hidden" name="id" value="<?php echo $this->item->id; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="organization" />
</form>
